OPC Studio User's Guide and Reference
Display Write Errors
Concepts > OPC Data Client Concepts > OPC Data Client Development Models > Live Binding Model > Live Binding Model for OPC Data (Classic and UA) > Typical Binding Scenarios > Display Write Errors

When the Write fails, you want the user be notified. One way to do this is with the standard ErrorProvider control. For example, if you attempt to write a value that is too large, an error icon appears, and the error message can be seen in the associated tooltip.

How to configure this feature:

On a PointBinder, edit the BindingGroups collection, "Add" a new binding group, set its AutoSubscribe property to False, and set its WriteEventSource.SourceComponent to the button that should invoke the Write.

Place the ErrorProvider extender from the toolbox items onto the component tray.

Configure the binding in a usual way. Use the "Edit Live Bindings" command, and for the BindingOperations options, select only "Write", and set the BindingGroup property of the item binding to the binding group you have created earlier. Then, "Clone" the existing binding, and change the cloned binding as follows: Set the ArgumentsPath to ErrorMessage. Set the ValueTarget.ExtenderProvider to the ErrorProvider component on your form, and set the ValueTarget.TargetMember to the Error member. This will cause the error message from the OPC item be stored into the error text displayed by the ErrorProvider for the control.

See Also